package com.longshihan.testlh;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.longshihan.lh.ui.CustomGuildeOptions;
import com.longshihan.lh.ui.CustomStateOptions;
import com.longshihan.lh.ui.StatusLayout;

public class Main2Activity extends AppCompatActivity {
    StatusLayout mStatusLayout;
    TextView mTextView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        mTextView = (TextView) findViewById(R.id.test_textview);
        mStatusLayout = new StatusLayout(this);
        mStatusLayout.setLayoutConfig(new com.longshihan.lh.ui.BuildConfig().setContent(true)
                .setContentView(mTextView));
        mStatusLayout.showView(new CustomStateOptions()
                .image(R.mipmap.ic_launcher)
                .buttonClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Toast.makeText(Main2Activity.this, "测试", Toast.LENGTH_SHORT).show();
                    }
                })
                .error());
        mStatusLayout.showGuildeView(new CustomGuildeOptions(this)
                .appendView(R.layout.test1, R.id.testnum)
                .appendView(R.layout.test2)
                .appendView(R.layout.test3)
        );
        //mStatusLayout.showGuideView();

        Log.d("Text","sss"+this.mTextView.getText().toString());
    }
}
